package com.joizhang.seckill.api.redis;

public class UserKey extends BasePrefix {

    /**
     * 默认两天
     */
    public static final int TOKEN_EXPIRE = 3600 * 24 * 2;

    public static final int USER_ID_EXPIRE = 0;

    /**
     * 防止被外面实例化
     */
    private UserKey(int expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }

    /**
     * 需要缓存的字段
     */
    public static final UserKey TOKEN = new UserKey(TOKEN_EXPIRE, "str:token");
    public static final UserKey USER_ID = new UserKey(USER_ID_EXPIRE, "hash:id");

}
